package com.code.service.impl;

import com.code.domain.Activity;
import com.code.mapper.ActivityMapper;
import com.code.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ActivityServiceImpl  implements ActivityService {
    @Autowired
    ActivityMapper activityMapper;
    @Override
    public Activity search(Integer activityId) {
        return activityMapper.search(activityId);
    }

    @Override
    public int addActivity(Double full, Double decrease) {
        return activityMapper.addActivity(full,decrease);
    }

    @Override
    public int deleteActivity(Integer activityId) {
        return activityMapper.deleteActivity(activityId);
    }

    @Override
    public int updateActivity(Activity activity) {
        return activityMapper.updateActivity(activity);
    }

    @Override
    public List<Activity> searchAll() {
        return activityMapper.searchAll();
    }
}
